package com.inspectortime.service;

import java.util.ArrayList;
import java.util.List;

/**
 * Just a dumb mock impl because I'm offline so I can't use the Sax impl, and I haven't taken
 * the time to figure out how to dump data from a text file into hsql
 * 
 * @author bones
 *
 */
public class MockZipCodeSearchServiceImpl extends AbstractZipCodeSearchService {
	
	
	public List<ZipCodeInfo> findNearbyZipCodes(String zipCode, int radiusInMiles) {
		List<ZipCodeInfo> results = new ArrayList<ZipCodeInfo>();
		results.add(mockZipCode(zipCode));
		return results;
	}
	
	public double findDistanceInMiles(String zipCodeA, String zipCodeB) {
		return 10;
	}

	public ZipCodeInfo lookupZipCode(String zipCode) {
		return mockZipCode(zipCode);
	}
	
	public ZipCodeInfo mockZipCode(String zipCode) {
		ZipCodeInfo zip = new ZipCodeInfo();
		zip.setCity("MockCity");
		zip.setCountyName("MockCounty");
		zip.setStateCode("GA");
		zip.setStateName("Georgia");
		zip.setZipCode(zipCode);
		return zip;
	}

}
